Integrand size = 36, antiderivative size = 118 \[ \int \frac {(A+B \sin (e+f x)) (c-c \sin (e+f x))^2}{a+a \sin (e+f x)} \, dx=-\frac {3 (2 A-3 B) c^2 x}{2 a}-\frac {3 (2 A-3 B) c^2 \cos (e+f x)}{2 a f}-\frac {a^2 (A-B) c^2 \cos ^5(e+f x)}{f (a+a \sin (e+f x))^3}-\frac {(2 A-3 B) c^2 \cos ^3(e+f x)}{2 f (a+a \sin (e+f x))} \]
-3/2*(2*A-3*B)*c^2*x/a-3/2*(2*A-3*B)*c^2*cos(f*x+e)/a/f-a^2*(A-B)*c^2*cos( f*x+e)^5/f/(a+a*sin(f*x+e))^3-1/2*(2*A-3*B)*c^2*cos(f*x+e)^3/f/(a+a*sin(f* x+e))
Time = 8.66 (sec) , antiderivative size = 188, normalized size of antiderivative = 1.59 \[ \int \frac {(A+B \sin (e+f x)) (c-c \sin (e+f x))^2}{a+a \sin (e+f x)} \, dx=-\frac {c^2 \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right ) (-1+\sin (e+f x))^2 \left (\cos \left (\frac {1}{2} (e+f x)\right ) (6 (2 A-3 B) (e+f x)+4 (A-3 B) \cos (e+f x)+B \sin (2 (e+f x)))+\sin \left (\frac {1}{2} (e+f x)\right ) (4 A (-8+3 e+3 f x)-2 B (-16+9 e+9 f x)+4 (A-3 B) \cos (e+f x)+B \sin (2 (e+f x)))\right )}{4 a f \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )^4 (1+\sin (e+f x))} \]
-1/4*(c^2*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])*(-1 + Sin[e + f*x])^2*(Cos [(e + f*x)/2]*(6*(2*A - 3*B)*(e + f*x) + 4*(A - 3*B)*Cos[e + f*x] + B*Sin[ 2*(e + f*x)]) + Sin[(e + f*x)/2]*(4*A*(-8 + 3*e + 3*f*x) - 2*B*(-16 + 9*e + 9*f*x) + 4*(A - 3*B)*Cos[e + f*x] + B*Sin[2*(e + f*x)])))/(a*f*(Cos[(e + f*x)/2] - Sin[(e + f*x)/2])^4*(1 + Sin[e + f*x]))
Time = 0.65 (sec) , antiderivative size = 108, normalized size of antiderivative = 0.92, number of steps used = 9, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3042, 3446, 3042, 3338, 3042, 3158, 3042, 3161, 24}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {(c-c \sin (e+f x))^2 (A+B \sin (e+f x))}{a \sin (e+f x)+a} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(c-c \sin (e+f x))^2 (A+B \sin (e+f x))}{a \sin (e+f x)+a}dx\) |
\(\Big \downarrow \) 3446 |
\(\displaystyle a^2 c^2 \int \frac {\cos ^4(e+f x) (A+B \sin (e+f x))}{(\sin (e+f x) a+a)^3}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a^2 c^2 \int \frac {\cos (e+f x)^4 (A+B \sin (e+f x))}{(\sin (e+f x) a+a)^3}dx\) |
\(\Big \downarrow \) 3338 |
\(\displaystyle a^2 c^2 \left (-\frac {(2 A-3 B) \int \frac {\cos ^4(e+f x)}{(\sin (e+f x) a+a)^2}dx}{a}-\frac {(A-B) \cos ^5(e+f x)}{f (a \sin (e+f x)+a)^3}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a^2 c^2 \left (-\frac {(2 A-3 B) \int \frac {\cos (e+f x)^4}{(\sin (e+f x) a+a)^2}dx}{a}-\frac {(A-B) \cos ^5(e+f x)}{f (a \sin (e+f x)+a)^3}\right )\) |
\(\Big \downarrow \) 3158 |
\(\displaystyle a^2 c^2 \left (-\frac {(2 A-3 B) \left (\frac {3 \int \frac {\cos ^2(e+f x)}{\sin (e+f x) a+a}dx}{2 a}+\frac {\cos ^3(e+f x)}{2 f \left (a^2 \sin (e+f x)+a^2\right )}\right )}{a}-\frac {(A-B) \cos ^5(e+f x)}{f (a \sin (e+f x)+a)^3}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a^2 c^2 \left (-\frac {(2 A-3 B) \left (\frac {3 \int \frac {\cos (e+f x)^2}{\sin (e+f x) a+a}dx}{2 a}+\frac {\cos ^3(e+f x)}{2 f \left (a^2 \sin (e+f x)+a^2\right )}\right )}{a}-\frac {(A-B) \cos ^5(e+f x)}{f (a \sin (e+f x)+a)^3}\right )\) |
\(\Big \downarrow \) 3161 |
\(\displaystyle a^2 c^2 \left (-\frac {(2 A-3 B) \left (\frac {3 \left (\frac {\int 1dx}{a}+\frac {\cos (e+f x)}{a f}\right )}{2 a}+\frac {\cos ^3(e+f x)}{2 f \left (a^2 \sin (e+f x)+a^2\right )}\right )}{a}-\frac {(A-B) \cos ^5(e+f x)}{f (a \sin (e+f x)+a)^3}\right )\) |
\(\Big \downarrow \) 24 |
\(\displaystyle a^2 c^2 \left (-\frac {(2 A-3 B) \left (\frac {\cos ^3(e+f x)}{2 f \left (a^2 \sin (e+f x)+a^2\right )}+\frac {3 \left (\frac {\cos (e+f x)}{a f}+\frac {x}{a}\right )}{2 a}\right )}{a}-\frac {(A-B) \cos ^5(e+f x)}{f (a \sin (e+f x)+a)^3}\right )\) |
a^2*c^2*(-(((A - B)*Cos[e + f*x]^5)/(f*(a + a*Sin[e + f*x])^3)) - ((2*A - 3*B)*((3*(x/a + Cos[e + f*x]/(a*f)))/(2*a) + Cos[e + f*x]^3/(2*f*(a^2 + a^ 2*Sin[e + f*x]))))/a)
3.1.54.3.1 Defintions of rubi rules used
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_), x_Symbol] :> Simp[g*(g*Cos[e + f*x])^(p - 1)*((a + b*Sin[e + f*x ])^(m + 1)/(b*f*(m + p))), x] + Simp[g^2*((p - 1)/(a*(m + p))) Int[(g*Cos [e + f*x])^(p - 2)*(a + b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{a, b, e, f, g}, x] && EqQ[a^2 - b^2, 0] && LtQ[m, -1] && GtQ[p, 1] && (GtQ[m, -2] || EqQ[2*m + p + 1, 0] || (EqQ[m, -2] && IntegerQ[p])) && NeQ[m + p, 0] && In tegersQ[2*m, 2*p]
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)/((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)]), x_Symbol] :> Simp[g*((g*Cos[e + f*x])^(p - 1)/(b*f*(p - 1))), x] + Si mp[g^2/a Int[(g*Cos[e + f*x])^(p - 2), x], x] /; FreeQ[{a, b, e, f, g}, x ] && EqQ[a^2 - b^2, 0] && GtQ[p, 1] && IntegerQ[2*p]
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b*c - a*d)*(g*Cos[e + f*x])^(p + 1)*((a + b*Sin[e + f*x])^m/(a*f*g*(2*m + p + 1) )), x] + Simp[(a*d*m + b*c*(m + p + 1))/(a*b*(2*m + p + 1)) Int[(g*Cos[e + f*x])^p*(a + b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{a, b, c, d, e, f, g, m, p}, x] && EqQ[a^2 - b^2, 0] && (LtQ[m, -1] || ILtQ[Simplify[m + p], 0 ]) && NeQ[2*m + p + 1, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Si mp[a^m*c^m Int[Cos[e + f*x]^(2*m)*(c + d*Sin[e + f*x])^(n - m)*(A + B*Sin [e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && EqQ[b*c + a* d, 0] && EqQ[a^2 - b^2, 0] && IntegerQ[m] && !(IntegerQ[n] && ((LtQ[m, 0] && GtQ[n, 0]) || LtQ[0, n, m] || LtQ[m, n, 0]))
Time = 0.64 (sec) , antiderivative size = 94, normalized size of antiderivative = 0.80
method | result | size |
parallelrisch | \(\frac {4 c^{2} \left (\frac {\left (-A +3 B \right ) \cos \left (2 f x +2 e \right )}{8}-\frac {B \sin \left (3 f x +3 e \right )}{32}+\frac {\left (-3 f x A +\frac {9}{2} f x B -5 A +7 B \right ) \cos \left (f x +e \right )}{4}+\left (A -\frac {33 B}{32}\right ) \sin \left (f x +e \right )-\frac {9 A}{8}+\frac {11 B}{8}\right )}{a f \cos \left (f x +e \right )}\) | \(94\) |
derivativedivides | \(\frac {2 c^{2} \left (-\frac {-\frac {B \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2}+\left (A -3 B \right ) \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\frac {B \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{2}+A -3 B}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{2}}-\frac {3 \left (2 A -3 B \right ) \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2}-\frac {4 A -4 B}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}\right )}{f a}\) | \(119\) |
default | \(\frac {2 c^{2} \left (-\frac {-\frac {B \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2}+\left (A -3 B \right ) \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\frac {B \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{2}+A -3 B}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{2}}-\frac {3 \left (2 A -3 B \right ) \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2}-\frac {4 A -4 B}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}\right )}{f a}\) | \(119\) |
risch | \(-\frac {3 c^{2} x A}{a}+\frac {9 c^{2} x B}{2 a}-\frac {c^{2} {\mathrm e}^{i \left (f x +e \right )} A}{2 a f}+\frac {3 c^{2} {\mathrm e}^{i \left (f x +e \right )} B}{2 a f}-\frac {c^{2} {\mathrm e}^{-i \left (f x +e \right )} A}{2 a f}+\frac {3 c^{2} {\mathrm e}^{-i \left (f x +e \right )} B}{2 a f}-\frac {8 c^{2} A}{f a \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}+\frac {8 c^{2} B}{f a \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}-\frac {B \,c^{2} \sin \left (2 f x +2 e \right )}{4 a f}\) | \(179\) |
norman | \(\frac {\frac {\left (6 A \,c^{2}-4 B \,c^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{a f}+\frac {\left (8 A \,c^{2}-9 B \,c^{2}\right ) \left (\tan ^{7}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a f}+\frac {\left (20 A \,c^{2}-15 B \,c^{2}\right ) \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a f}+\frac {\left (22 A \,c^{2}-20 B \,c^{2}\right ) \left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a f}-\frac {2 A \,c^{2}-5 B \,c^{2}}{a f}-\frac {3 \left (2 A -3 B \right ) c^{2} x}{2 a}-\frac {\left (2 A \,c^{2}-3 B \,c^{2}\right ) \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a f}-\frac {\left (4 A \,c^{2}-8 B \,c^{2}\right ) \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a f}-\frac {3 \left (2 A -3 B \right ) c^{2} x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{2 a}-\frac {9 \left (2 A -3 B \right ) c^{2} x \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 a}-\frac {9 \left (2 A -3 B \right ) c^{2} x \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 a}-\frac {9 \left (2 A -3 B \right ) c^{2} x \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 a}-\frac {9 \left (2 A -3 B \right ) c^{2} x \left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 a}-\frac {3 \left (2 A -3 B \right ) c^{2} x \left (\tan ^{6}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 a}-\frac {3 \left (2 A -3 B \right ) c^{2} x \left (\tan ^{7}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 a}}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right ) \left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{3}}\) | \(441\) |
4*c^2*(1/8*(-A+3*B)*cos(2*f*x+2*e)-1/32*B*sin(3*f*x+3*e)+1/4*(-3*f*x*A+9/2 *f*x*B-5*A+7*B)*cos(f*x+e)+(A-33/32*B)*sin(f*x+e)-9/8*A+11/8*B)/a/f/cos(f* x+e)
Time = 0.27 (sec) , antiderivative size = 179, normalized size of antiderivative = 1.52 \[ \int \frac {(A+B \sin (e+f x)) (c-c \sin (e+f x))^2}{a+a \sin (e+f x)} \, dx=\frac {B c^{2} \cos \left (f x + e\right )^{3} - 3 \, {\left (2 \, A - 3 \, B\right )} c^{2} f x - 2 \, {\left (A - 3 \, B\right )} c^{2} \cos \left (f x + e\right )^{2} - 8 \, {\left (A - B\right )} c^{2} - {\left (3 \, {\left (2 \, A - 3 \, B\right )} c^{2} f x + {\left (10 \, A - 13 \, B\right )} c^{2}\right )} \cos \left (f x + e\right ) - {\left (3 \, {\left (2 \, A - 3 \, B\right )} c^{2} f x + B c^{2} \cos \left (f x + e\right )^{2} + {\left (2 \, A - 5 \, B\right )} c^{2} \cos \left (f x + e\right ) - 8 \, {\left (A - B\right )} c^{2}\right )} \sin \left (f x + e\right )}{2 \, {\left (a f \cos \left (f x + e\right ) + a f \sin \left (f x + e\right ) + a f\right )}} \]
1/2*(B*c^2*cos(f*x + e)^3 - 3*(2*A - 3*B)*c^2*f*x - 2*(A - 3*B)*c^2*cos(f* x + e)^2 - 8*(A - B)*c^2 - (3*(2*A - 3*B)*c^2*f*x + (10*A - 13*B)*c^2)*cos (f*x + e) - (3*(2*A - 3*B)*c^2*f*x + B*c^2*cos(f*x + e)^2 + (2*A - 5*B)*c^ 2*cos(f*x + e) - 8*(A - B)*c^2)*sin(f*x + e))/(a*f*cos(f*x + e) + a*f*sin( f*x + e) + a*f)
Leaf count of result is larger than twice the leaf count of optimal. 2365 vs. \(2 (99) = 198\).
Time = 2.03 (sec) , antiderivative size = 2365, normalized size of antiderivative = 20.04 \[ \int \frac {(A+B \sin (e+f x)) (c-c \sin (e+f x))^2}{a+a \sin (e+f x)} \, dx=\text {Too large to display} \]
Piecewise((-6*A*c**2*f*x*tan(e/2 + f*x/2)**5/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f* x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f) - 6*A*c**2*f*x*tan(e/2 + f*x/2)* *4/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f) - 12*A*c**2*f*x*tan(e/2 + f*x/2)**3/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan (e/2 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f) - 12*A*c**2*f*x*tan(e/2 + f*x/2)**2/(2*a* f*tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2) **3 + 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f) - 6*A*c* *2*f*x*tan(e/2 + f*x/2)/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2 )**4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e /2 + f*x/2) + 2*a*f) - 6*A*c**2*f*x/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan (e/2 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f) - 16*A*c**2*tan(e/2 + f*x/2)**4/(2*a*f*ta n(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f) - 4*A*c**2*t an(e/2 + f*x/2)**3/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f) - 36*A*c**2*tan(e/2 + f*x/2)**2/(2*a*f*tan(e/2 + f*x/2)...
Leaf count of result is larger than twice the leaf count of optimal. 608 vs. \(2 (112) = 224\).
Time = 0.31 (sec) , antiderivative size = 608, normalized size of antiderivative = 5.15 \[ \int \frac {(A+B \sin (e+f x)) (c-c \sin (e+f x))^2}{a+a \sin (e+f x)} \, dx=\frac {B c^{2} {\left (\frac {\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {5 \, \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {3 \, \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} + \frac {3 \, \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} + 4}{a + \frac {a \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {2 \, a \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {2 \, a \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} + \frac {a \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} + \frac {a \sin \left (f x + e\right )^{5}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{5}}} + \frac {3 \, \arctan \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )}{a}\right )} - 2 \, A c^{2} {\left (\frac {\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {\sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + 2}{a + \frac {a \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {a \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {a \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}} + \frac {\arctan \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )}{a}\right )} + 4 \, B c^{2} {\left (\frac {\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {\sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + 2}{a + \frac {a \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {a \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {a \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}} + \frac {\arctan \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )}{a}\right )} - 4 \, A c^{2} {\left (\frac {\arctan \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )}{a} + \frac {1}{a + \frac {a \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}}\right )} + 2 \, B c^{2} {\left (\frac {\arctan \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )}{a} + \frac {1}{a + \frac {a \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}}\right )} - \frac {2 \, A c^{2}}{a + \frac {a \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}}}{f} \]
(B*c^2*((sin(f*x + e)/(cos(f*x + e) + 1) + 5*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 3*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 3*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 + 4)/(a + a*sin(f*x + e)/(cos(f*x + e) + 1) + 2*a*sin(f*x + e )^2/(cos(f*x + e) + 1)^2 + 2*a*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + a*sin (f*x + e)^4/(cos(f*x + e) + 1)^4 + a*sin(f*x + e)^5/(cos(f*x + e) + 1)^5) + 3*arctan(sin(f*x + e)/(cos(f*x + e) + 1))/a) - 2*A*c^2*((sin(f*x + e)/(c os(f*x + e) + 1) + sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 2)/(a + a*sin(f*x + e)/(cos(f*x + e) + 1) + a*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + a*sin(f *x + e)^3/(cos(f*x + e) + 1)^3) + arctan(sin(f*x + e)/(cos(f*x + e) + 1))/ a) + 4*B*c^2*((sin(f*x + e)/(cos(f*x + e) + 1) + sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 2)/(a + a*sin(f*x + e)/(cos(f*x + e) + 1) + a*sin(f*x + e)^2/ (cos(f*x + e) + 1)^2 + a*sin(f*x + e)^3/(cos(f*x + e) + 1)^3) + arctan(sin (f*x + e)/(cos(f*x + e) + 1))/a) - 4*A*c^2*(arctan(sin(f*x + e)/(cos(f*x + e) + 1))/a + 1/(a + a*sin(f*x + e)/(cos(f*x + e) + 1))) + 2*B*c^2*(arctan (sin(f*x + e)/(cos(f*x + e) + 1))/a + 1/(a + a*sin(f*x + e)/(cos(f*x + e) + 1))) - 2*A*c^2/(a + a*sin(f*x + e)/(cos(f*x + e) + 1)))/f
Time = 0.31 (sec) , antiderivative size = 157, normalized size of antiderivative = 1.33 \[ \int \frac {(A+B \sin (e+f x)) (c-c \sin (e+f x))^2}{a+a \sin (e+f x)} \, dx=-\frac {\frac {3 \, {\left (2 \, A c^{2} - 3 \, B c^{2}\right )} {\left (f x + e\right )}}{a} + \frac {16 \, {\left (A c^{2} - B c^{2}\right )}}{a {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}} - \frac {2 \, {\left (B c^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 2 \, A c^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 6 \, B c^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - B c^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 2 \, A c^{2} + 6 \, B c^{2}\right )}}{{\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 1\right )}^{2} a}}{2 \, f} \]
-1/2*(3*(2*A*c^2 - 3*B*c^2)*(f*x + e)/a + 16*(A*c^2 - B*c^2)/(a*(tan(1/2*f *x + 1/2*e) + 1)) - 2*(B*c^2*tan(1/2*f*x + 1/2*e)^3 - 2*A*c^2*tan(1/2*f*x + 1/2*e)^2 + 6*B*c^2*tan(1/2*f*x + 1/2*e)^2 - B*c^2*tan(1/2*f*x + 1/2*e) - 2*A*c^2 + 6*B*c^2)/((tan(1/2*f*x + 1/2*e)^2 + 1)^2*a))/f
Time = 15.33 (sec) , antiderivative size = 241, normalized size of antiderivative = 2.04 \[ \int \frac {(A+B \sin (e+f x)) (c-c \sin (e+f x))^2}{a+a \sin (e+f x)} \, dx=-\frac {\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (2\,A\,c^2-5\,B\,c^2\right )+10\,A\,c^2-14\,B\,c^2+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\,\left (2\,A\,c^2-7\,B\,c^2\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,\left (8\,A\,c^2-9\,B\,c^2\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (18\,A\,c^2-21\,B\,c^2\right )}{f\,\left (a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5+a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4+2\,a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3+2\,a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+a\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )+a\right )}-\frac {3\,c^2\,\mathrm {atan}\left (\frac {3\,c^2\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (2\,A-3\,B\right )}{6\,A\,c^2-9\,B\,c^2}\right )\,\left (2\,A-3\,B\right )}{a\,f} \]
- (tan(e/2 + (f*x)/2)*(2*A*c^2 - 5*B*c^2) + 10*A*c^2 - 14*B*c^2 + tan(e/2 + (f*x)/2)^3*(2*A*c^2 - 7*B*c^2) + tan(e/2 + (f*x)/2)^4*(8*A*c^2 - 9*B*c^2 ) + tan(e/2 + (f*x)/2)^2*(18*A*c^2 - 21*B*c^2))/(f*(a + a*tan(e/2 + (f*x)/ 2) + 2*a*tan(e/2 + (f*x)/2)^2 + 2*a*tan(e/2 + (f*x)/2)^3 + a*tan(e/2 + (f* x)/2)^4 + a*tan(e/2 + (f*x)/2)^5)) - (3*c^2*atan((3*c^2*tan(e/2 + (f*x)/2) *(2*A - 3*B))/(6*A*c^2 - 9*B*c^2))*(2*A - 3*B))/(a*f)